# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=font-adobe-utopia-type1
pkgver=1.0.4
pkgrel=0
pkgdesc="X.org adobe utopia-type1 fonts"
url="http://xorg.freedesktop.org/"
arch="all"
license="custom"
depends="encodings font-alias mkfontscale mkfontdir fontconfig"
makedepends="font-util-dev bdftopcf"
install=
source="https://www.x.org/releases/individual/font/$pkgname-$pkgver.tar.bz2"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	update_config_sub || return 1
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-mapfiles=/usr/share/fonts/util \
		--with-fontdir=/usr/share/fonts/utopia-type1 \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make -j1 DESTDIR="$pkgdir" \
		MKFONTDIR=: \
		MKFONTSCALE=: \
		FCCACHE=: \
		install || return 1
}

sha512sums="53ff2ce7b17824a0eed1be6c3e3386e51983389f5623e732ac898c4e08769c8720f6d6b7c75b6455e050ec5dc390376747ca4cdb9f831a218f9dd5ee5edcd0d6  font-adobe-utopia-type1-1.0.4.tar.bz2"
